package com.zws.cucumber.spring.configuration;

import com.zws.cucumber.snapshot.ZwsMiscSnapshotManager;
import com.zws.cucumber.snapshot.ZwsSnapshotFacade;
import com.zws.cucumber.snapshot.ZwsSnapshotManager;
import com.zws.cucumber.snapshot.ZwsVarSnapshotManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class ZwsSnapshotConf {

    @Bean
    public ZwsMiscSnapshotManager httpHeaderSnapshotManager() {
        return new ZwsMiscSnapshotManager();
    }

    @Bean
    public ZwsVarSnapshotManager variableSnapshotManager() {
        return new ZwsVarSnapshotManager();
    }

    @Bean
    public ZwsSnapshotFacade snapshotFacade(@Autowired List<ZwsSnapshotManager<?>> snapshotManagers) {
        return new ZwsSnapshotFacade(snapshotManagers);
    }

}
